package script.mainpage.items
{
	import model.ConstantModel;
	import model.order.OrderGoodsVo;
	
	import ui.items.OrderGoosItemUI;
	
	public class OrderGoodsCell extends OrderGoosItemUI
	{
		private var orderGoodsVo:OrderGoodsVo;
		
		public function OrderGoodsCell()
		{
			super();
		}
		
		public function setData(data:OrderGoodsVo):void
		{
			orderGoodsVo = data;
			this.goodsPic.skin = orderGoodsVo.goodsImg;
			
			this.goodsNameLbl.text = "1份" + orderGoodsVo.sellWeight + (orderGoodsVo.offWeight != "0"?"±" + orderGoodsVo.offWeight:"") + "克"+ "|" + orderGoodsVo.goodsName;
			
			this.sellPriceLbl.text = "¥" + orderGoodsVo.sellPrice+"/件" + "  共" + orderGoodsVo.goodsCount + "件";
			
			var totalprice:String = (orderGoodsVo.sellPrice * orderGoodsVo.goodsCount).toFixed(2);
			this.realPay.text = "¥" + totalprice;
		}
	}
}